/*
 * @Author: tanjunyi@doctorwork.com
 * @Date: 2020-12-05 16:38:30
 * @LastEditors: tanjunyi@doctorwork.com
 * @LastEditTime: 2020-12-06 14:06:12
 * @Description:
 */
import { observable, action } from "mobx";


const system = observable({
	projects: [],
	config: {
		name: 'wr1',
		showCode: false,
	},
	runtime: {},
	changeConfig(config) {
		this.config = Object.assign(this.config, config);
	},
	addProject(config) {
		this.projects.push(config)
	}
})

export default system;




// 
// class System {
// 	@observable
// 	projects = [];

// 	@observable
// 	config = {
// 		name: 'wr1'
// 	}

// 	@observable
// 	runtime = {}

// 	@action
// 	changeConfig(config) {
// 		this.config = Object.assign(this.config, config);
// 	}

// 	@action
// 	addProject(config) {
// 		this.projects.push(config)
// 	}
// }
// const system = new System();

// export default system;